package com.test.designPattern.ch19;
import java.util.ArrayList;
import java.util.List;
/**
 * @ClassName CareTaker
 * @Description TODO
 * @Author 维康
 * @Date 2018/6/13 10:33
 * @Version 1.0
 **/


public class CareTaker {
    private List<Memento> mementoList = new ArrayList<Memento>();

    public void add(Memento state){
        mementoList.add(state);
    }

    public Memento get(int index){
        return mementoList.get(index);
    }
}